package siestageek;

import java.util.Scanner;

public class J02MyAge {
    //나이계산 프로그램
   //입력값:태어난 년도(생년)
   //변수:생년, 현재년도, 나이	
	
	public static void main(String[]Args){
		//1.변수선언
		int birthYear;
		int currentYear;
		int age;
		Scanner sc = null;
		
	   //2.생년입력, 나이계산
	   sc = new Scanner(System.in);
	   System.out.println("생년을 입력하세요");
	   birthYear = sc.nextInt();
	   System.out.println("현재년도를 입력하세요");
	   currentYear = sc.nextInt();
	   age = currentYear - birthYear +1;
	 //3.결과출력
	 System.out.println(birthYear);
	 System.out.println(currentYear);
	 System.out.println(age);
	}
}
